<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>knet: E:/knet-git/knet/knet/loop.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">knet
   &#160;<span id="projectnumber">1.4.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>结构体</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e74998c9a9305a116abc25fcf9a1edb.html">knet-git</a></li><li class="navelem"><a class="el" href="dir_a1c045b39f32066568ae964b52db514f.html">knet</a></li><li class="navelem"><a class="el" href="dir_f76d03789f0b12416cfffea59e2ed47d.html">knet</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">loop.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00072.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014-2015, dennis wang</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *     * Redistributions of source code must retain the above copyright</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *       notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *     * Redistributions in binary form must reproduce the above copyright</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *       notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *       documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * DISCLAIMED. IN NO EVENT SHALL dennis wang BE LIABLE FOR ANY</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef LOOP_H</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define LOOP_H</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00053.html">config.h</a>&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00073.html">loop_api.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a59174eaaecf0028aeac92d919acb6cd7.html#a59174eaaecf0028aeac92d919acb6cd7">knet_loop_add_channel_ref</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a5f2c16d159cea62a75e2d07927a346bd.html#a5f2c16d159cea62a75e2d07927a346bd">knet_loop_remove_channel_ref</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_ad0afd1d89a38d015b3b28127a1e7dce4.html#ad0afd1d89a38d015b3b28127a1e7dce4">knet_loop_close_channel_ref</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<a class="code" href="a00010.html">kdlist_t</a>* <a class="code" href="a00072_a5de04251528407b1077e26b8a619936a.html#a5de04251528407b1077e26b8a619936a">knet_loop_get_active_list</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<a class="code" href="a00010.html">kdlist_t</a>* <a class="code" href="a00072_a768e24c6dbc4a4694397903a0c886d49.html#a768e24c6dbc4a4694397903a0c886d49">knet_loop_get_close_list</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a24e13537994fbbf0920a20064f4d0d63.html#a24e13537994fbbf0920a20064f4d0d63">knet_loop_set_impl</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <span class="keywordtype">void</span>* impl);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="keywordtype">void</span>* <a class="code" href="a00072_a7692aa019b3ad845242804e7633b4849.html#a7692aa019b3ad845242804e7633b4849">knet_loop_get_impl</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<a class="code" href="a00053_ad0ada5642d10ce71bdd90816182f9b79.html#ad0ada5642d10ce71bdd90816182f9b79">thread_id_t</a> <a class="code" href="a00072_a352ae2febcbb9264ef1d5043618bcb80.html#a352ae2febcbb9264ef1d5043618bcb80">knet_loop_get_thread_id</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_afa47d6d4673ddfd9e4884d3c9aca7f7e.html#afa47d6d4673ddfd9e4884d3c9aca7f7e">knet_loop_set_balancer</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00030.html">kloop_balancer_t</a>* balancer);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<a class="code" href="a00030.html">kloop_balancer_t</a>* <a class="code" href="a00072_a775164485cff0fc31bc0d71204d44aca.html#a775164485cff0fc31bc0d71204d44aca">knet_loop_get_balancer</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_ab2829c911d0a52d4a59951cf2805c68c.html#ab2829c911d0a52d4a59951cf2805c68c">knet_loop_notify_accept</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a3748a72ab4d7a23ee408d0cdf1fd1acb.html#a3748a72ab4d7a23ee408d0cdf1fd1acb">knet_loop_notify_accept_async</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_aed97725b0a9706543e9b31b604483740.html#aed97725b0a9706543e9b31b604483740">knet_loop_notify_connect</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_ad58fb456de6509e9b5dc3938acc29ee6.html#ad58fb456de6509e9b5dc3938acc29ee6">knet_loop_notify_send</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref, <a class="code" href="a00005.html">kbuffer_t</a>* send_buffer);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a8689d188eed30a72dc802eb008eef89a.html#a8689d188eed30a72dc802eb008eef89a">knet_loop_notify_close</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a203d49b05fbe8d0fed73099d7a48e2d8.html#a203d49b05fbe8d0fed73099d7a48e2d8">knet_loop_queue_cb</a>(<a class="code" href="a00007.html">kchannel_ref_t</a>* channel, <a class="code" href="a00053_a2fd2faf971268f5b682ab375c455f7c9.html#a2fd2faf971268f5b682ab375c455f7c9">knet_channel_cb_event_e</a> e);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_aa75761b5da6c3ea9886d3458fc4054fe.html#aa75761b5da6c3ea9886d3458fc4054fe">knet_loop_notify</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a80c9fb216de2e04a4f301ccb4ca7a6f5.html#a80c9fb216de2e04a4f301ccb4ca7a6f5">knet_loop_event_process</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a00c96dec79cb9493a01cef8bb52534f4.html#a00c96dec79cb9493a01cef8bb52534f4">knet_loop_check_timeout</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, time_t ts);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a58a5c12ddf68c8cc9f21c373bc0bcc6f.html#a58a5c12ddf68c8cc9f21c373bc0bcc6f">knet_loop_check_close</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00072_af8babef4a6cb0c64d5bd25665cc36821.html#af8babef4a6cb0c64d5bd25665cc36821">knet_loop_check_running</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_a1f1c1aa48792e069f46d4586da064e30.html#a1f1c1aa48792e069f46d4586da064e30">knet_loop_set_balance_options</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00053_aa131da8fb72468b39b6ee0e2d46b17b2.html#aa131da8fb72468b39b6ee0e2d46b17b2">knet_loop_balance_option_e</a> options);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<a class="code" href="a00053_aa131da8fb72468b39b6ee0e2d46b17b2.html#aa131da8fb72468b39b6ee0e2d46b17b2">knet_loop_balance_option_e</a> <a class="code" href="a00072_a127c7897dd1ea9db069c7855bbebb557.html#a127c7897dd1ea9db069c7855bbebb557">knet_loop_get_balance_options</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00072_a6bb7816f43410b76b5b0c6d0f6edfbd8.html#a6bb7816f43410b76b5b0c6d0f6edfbd8">knet_loop_check_balance_options</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00053_aa131da8fb72468b39b6ee0e2d46b17b2.html#aa131da8fb72468b39b6ee0e2d46b17b2">knet_loop_balance_option_e</a> options);</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;<span class="comment"> * 选取器需要实现的函数 - 建立并初始化</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="comment"> * @param loop kloop_t实例</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<span class="comment"> * @retval error_ok 成功</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="comment"> * @retval 其他 失败</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00072_a68399cbcf73664b842f77232d3845299.html#a68399cbcf73664b842f77232d3845299">knet_impl_create</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="comment"> * 选取器需要实现的函数 - 停止并销毁</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="comment"> * @param loop kloop_t实例</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00072_afaf33dbbff8e1503b567163626adaca0.html#afaf33dbbff8e1503b567163626adaca0">knet_impl_destroy</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="comment"> * 选取器需要实现的函数 - 运行一次事件循环</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="comment"> * @param loop kloop_t实例</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="comment"> * @retval error_ok 成功</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;<span class="comment"> * @retval 其他 失败</span></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00072_a9ad7fc0f0c4c61e66b3503a3a3b6631d.html#a9ad7fc0f0c4c61e66b3503a3a3b6631d">knet_impl_run_once</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="comment"> * 选取器需要实现的函数 - 投递一个（多个）事件</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;<span class="comment"> * @param loop kloop_t实例</span></div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;<span class="comment"> * @param e 事件</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="comment"> * @retval error_ok 成功</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;<span class="comment"> * @retval 其他 失败</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00072_ac0b0974feef9ded8f9d90d3a272e2a0e.html#ac0b0974feef9ded8f9d90d3a272e2a0e">knet_impl_event_add</a>(<a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref, <a class="code" href="a00053_accd62b4c787cfb91e81aa14210302863.html#accd62b4c787cfb91e81aa14210302863">knet_channel_event_e</a> e);</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="comment"> * 选取器需要实现的函数 - 取消一个（多个）事件</span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="comment"> * @param loop kloop_t实例</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="comment"> * @param e 事件</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;<span class="comment"> * @retval error_ok 成功</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<span class="comment"> * @retval 其他 失败</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00072_a3a3bef6d2959520812d726dc86eb3ab0.html#a3a3bef6d2959520812d726dc86eb3ab0">knet_impl_event_remove</a>(<a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref, <a class="code" href="a00053_accd62b4c787cfb91e81aa14210302863.html#accd62b4c787cfb91e81aa14210302863">knet_channel_event_e</a> e);</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;<span class="comment"> * 选取器需要实现的函数 - 通知有新的管道加入了活跃链表</span></div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;<span class="comment"> * @param loop kloop_t实例</span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;<span class="comment"> * @param channel_ref kchannel_ref_t实例</span></div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;<span class="comment"> * @retval error_ok 成功</span></div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;<span class="comment"> * @retval 其他 失败</span></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00072_a67e060e746797b3f6c76f60435aca4c7.html#a67e060e746797b3f6c76f60435aca4c7">knet_impl_add_channel_ref</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;<span class="comment"> * 选取器需要实现的函数 - 通知管道关闭并销毁</span></div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;<span class="comment"> * @param loop kloop_t实例</span></div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;<span class="comment"> * @param channel_ref kchannel_ref_t实例</span></div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;<span class="comment"> * @retval error_ok 成功</span></div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;<span class="comment"> * @retval 其他 失败</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00072_abc481758c524a7dd779ac7c4dad144f9.html#abc481758c524a7dd779ac7c4dad144f9">knet_impl_remove_channel_ref</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>, <a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="comment"> * 选取器需要实现的函数 - 新连接到来时检测选取器自定义实现</span></div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="comment"> * @param channel_ref kchannel_ref_t实例</span></div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;<span class="comment"> * @return 套接字</span></div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<a class="code" href="a00053_a0d9e0afbf02fb6ed6c5b1415dce51b05.html#a0d9e0afbf02fb6ed6c5b1415dce51b05">socket_t</a> <a class="code" href="a00072_ac56384b1f4ca12d24768f4b3434994ad.html#ac56384b1f4ca12d24768f4b3434994ad">knet_impl_channel_accept</a>(<a class="code" href="a00007.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;<span class="keywordtype">void</span>* <a class="code" href="a00072_a408e38fd57e572c9f9fd70d729663495.html#a408e38fd57e572c9f9fd70d729663495">knet_loop_get_data</a>(<a class="code" href="a00034.html">kloop_t</a>* <a class="code" href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">loop</a>);</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LOOP_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="a00072_a9ad7fc0f0c4c61e66b3503a3a3b6631d_html_a9ad7fc0f0c4c61e66b3503a3a3b6631d"><div class="ttname"><a href="a00072_a9ad7fc0f0c4c61e66b3503a3a3b6631d.html#a9ad7fc0f0c4c61e66b3503a3a3b6631d">knet_impl_run_once</a></div><div class="ttdeci">int knet_impl_run_once(kloop_t *loop)</div></div>
<div class="ttc" id="a00072_a7692aa019b3ad845242804e7633b4849_html_a7692aa019b3ad845242804e7633b4849"><div class="ttname"><a href="a00072_a7692aa019b3ad845242804e7633b4849.html#a7692aa019b3ad845242804e7633b4849">knet_loop_get_impl</a></div><div class="ttdeci">void * knet_loop_get_impl(kloop_t *loop)</div><div class="ttdoc">取得选取器实现 </div><div class="ttdef"><b>Definition:</b> loop.c:347</div></div>
<div class="ttc" id="a00072_a68399cbcf73664b842f77232d3845299_html_a68399cbcf73664b842f77232d3845299"><div class="ttname"><a href="a00072_a68399cbcf73664b842f77232d3845299.html#a68399cbcf73664b842f77232d3845299">knet_impl_create</a></div><div class="ttdeci">int knet_impl_create(kloop_t *loop)</div></div>
<div class="ttc" id="a00010_html"><div class="ttname"><a href="a00010.html">_dlist_t</a></div><div class="ttdef"><b>Definition:</b> list.c:39</div></div>
<div class="ttc" id="a00053_ad0ada5642d10ce71bdd90816182f9b79_html_ad0ada5642d10ce71bdd90816182f9b79"><div class="ttname"><a href="a00053_ad0ada5642d10ce71bdd90816182f9b79.html#ad0ada5642d10ce71bdd90816182f9b79">thread_id_t</a></div><div class="ttdeci">#define thread_id_t</div><div class="ttdef"><b>Definition:</b> config.h:87</div></div>
<div class="ttc" id="a00072_af8babef4a6cb0c64d5bd25665cc36821_html_af8babef4a6cb0c64d5bd25665cc36821"><div class="ttname"><a href="a00072_af8babef4a6cb0c64d5bd25665cc36821.html#af8babef4a6cb0c64d5bd25665cc36821">knet_loop_check_running</a></div><div class="ttdeci">int knet_loop_check_running(kloop_t *loop)</div><div class="ttdoc">检查是否正在运行 </div><div class="ttdef"><b>Definition:</b> loop.c:418</div></div>
<div class="ttc" id="a00072_ad58fb456de6509e9b5dc3938acc29ee6_html_ad58fb456de6509e9b5dc3938acc29ee6"><div class="ttname"><a href="a00072_ad58fb456de6509e9b5dc3938acc29ee6.html#ad58fb456de6509e9b5dc3938acc29ee6">knet_loop_notify_send</a></div><div class="ttdeci">void knet_loop_notify_send(kloop_t *loop, kchannel_ref_t *channel_ref, kbuffer_t *send_buffer)</div><div class="ttdoc">发送事件通知 - 跨线程发送 </div><div class="ttdef"><b>Definition:</b> loop.c:195</div></div>
<div class="ttc" id="a00072_a00c96dec79cb9493a01cef8bb52534f4_html_a00c96dec79cb9493a01cef8bb52534f4"><div class="ttname"><a href="a00072_a00c96dec79cb9493a01cef8bb52534f4.html#a00c96dec79cb9493a01cef8bb52534f4">knet_loop_check_timeout</a></div><div class="ttdeci">void knet_loop_check_timeout(kloop_t *loop, time_t ts)</div><div class="ttdoc">检查活跃管道空闲超时 </div><div class="ttdef"><b>Definition:</b> loop.c:372</div></div>
<div class="ttc" id="a00030_html"><div class="ttname"><a href="a00030.html">_loop_balancer_t</a></div><div class="ttdef"><b>Definition:</b> loop_balancer.c:36</div></div>
<div class="ttc" id="a00072_aed97725b0a9706543e9b31b604483740_html_aed97725b0a9706543e9b31b604483740"><div class="ttname"><a href="a00072_aed97725b0a9706543e9b31b604483740.html#aed97725b0a9706543e9b31b604483740">knet_loop_notify_connect</a></div><div class="ttdeci">void knet_loop_notify_connect(kloop_t *loop, kchannel_ref_t *channel_ref)</div><div class="ttdoc">发送事件通知 - 发起连接 </div><div class="ttdef"><b>Definition:</b> loop.c:189</div></div>
<div class="ttc" id="a00072_afa47d6d4673ddfd9e4884d3c9aca7f7e_html_afa47d6d4673ddfd9e4884d3c9aca7f7e"><div class="ttname"><a href="a00072_afa47d6d4673ddfd9e4884d3c9aca7f7e.html#afa47d6d4673ddfd9e4884d3c9aca7f7e">knet_loop_set_balancer</a></div><div class="ttdeci">void knet_loop_set_balancer(kloop_t *loop, kloop_balancer_t *balancer)</div><div class="ttdoc">设置负载均衡器(kloop_balancer_t实例） </div><div class="ttdef"><b>Definition:</b> loop.c:362</div></div>
<div class="ttc" id="a00072_a80c9fb216de2e04a4f301ccb4ca7a6f5_html_a80c9fb216de2e04a4f301ccb4ca7a6f5"><div class="ttname"><a href="a00072_a80c9fb216de2e04a4f301ccb4ca7a6f5.html#a80c9fb216de2e04a4f301ccb4ca7a6f5">knet_loop_event_process</a></div><div class="ttdeci">void knet_loop_event_process(kloop_t *loop)</div><div class="ttdoc">处理事件 </div><div class="ttdef"><b>Definition:</b> loop.c:229</div></div>
<div class="ttc" id="a00072_aa75761b5da6c3ea9886d3458fc4054fe_html_aa75761b5da6c3ea9886d3458fc4054fe"><div class="ttname"><a href="a00072_aa75761b5da6c3ea9886d3458fc4054fe.html#aa75761b5da6c3ea9886d3458fc4054fe">knet_loop_notify</a></div><div class="ttdeci">void knet_loop_notify(kloop_t *loop)</div><div class="ttdoc">触发读事件回调knet_loop_queue_cb </div><div class="ttdef"><b>Definition:</b> loop.c:222</div></div>
<div class="ttc" id="a00072_ab2829c911d0a52d4a59951cf2805c68c_html_ab2829c911d0a52d4a59951cf2805c68c"><div class="ttname"><a href="a00072_ab2829c911d0a52d4a59951cf2805c68c.html#ab2829c911d0a52d4a59951cf2805c68c">knet_loop_notify_accept</a></div><div class="ttdeci">void knet_loop_notify_accept(kloop_t *loop, kchannel_ref_t *channel_ref)</div><div class="ttdoc">发送事件通知 - 监听到新连接 </div><div class="ttdef"><b>Definition:</b> loop.c:177</div></div>
<div class="ttc" id="a00072_a3748a72ab4d7a23ee408d0cdf1fd1acb_html_a3748a72ab4d7a23ee408d0cdf1fd1acb"><div class="ttname"><a href="a00072_a3748a72ab4d7a23ee408d0cdf1fd1acb.html#a3748a72ab4d7a23ee408d0cdf1fd1acb">knet_loop_notify_accept_async</a></div><div class="ttdeci">void knet_loop_notify_accept_async(kloop_t *loop, kchannel_ref_t *channel_ref)</div><div class="ttdoc">发起监听通知 - 当前loop内监听 </div><div class="ttdef"><b>Definition:</b> loop.c:183</div></div>
<div class="ttc" id="a00072_a775164485cff0fc31bc0d71204d44aca_html_a775164485cff0fc31bc0d71204d44aca"><div class="ttname"><a href="a00072_a775164485cff0fc31bc0d71204d44aca.html#a775164485cff0fc31bc0d71204d44aca">knet_loop_get_balancer</a></div><div class="ttdeci">kloop_balancer_t * knet_loop_get_balancer(kloop_t *loop)</div><div class="ttdoc">取得负载均衡器(kloop_balancer_t实例） </div><div class="ttdef"><b>Definition:</b> loop.c:367</div></div>
<div class="ttc" id="a00072_a67e060e746797b3f6c76f60435aca4c7_html_a67e060e746797b3f6c76f60435aca4c7"><div class="ttname"><a href="a00072_a67e060e746797b3f6c76f60435aca4c7.html#a67e060e746797b3f6c76f60435aca4c7">knet_impl_add_channel_ref</a></div><div class="ttdeci">int knet_impl_add_channel_ref(kloop_t *loop, kchannel_ref_t *channel_ref)</div></div>
<div class="ttc" id="a00072_a5f2c16d159cea62a75e2d07927a346bd_html_a5f2c16d159cea62a75e2d07927a346bd"><div class="ttname"><a href="a00072_a5f2c16d159cea62a75e2d07927a346bd.html#a5f2c16d159cea62a75e2d07927a346bd">knet_loop_remove_channel_ref</a></div><div class="ttdeci">void knet_loop_remove_channel_ref(kloop_t *loop, kchannel_ref_t *channel_ref)</div><div class="ttdoc">从到活跃链表删除kchannel_ref_t实例 </div><div class="ttdef"><b>Definition:</b> loop.c:332</div></div>
<div class="ttc" id="a00072_ad0afd1d89a38d015b3b28127a1e7dce4_html_ad0afd1d89a38d015b3b28127a1e7dce4"><div class="ttname"><a href="a00072_ad0afd1d89a38d015b3b28127a1e7dce4.html#ad0afd1d89a38d015b3b28127a1e7dce4">knet_loop_close_channel_ref</a></div><div class="ttdeci">void knet_loop_close_channel_ref(kloop_t *loop, kchannel_ref_t *channel_ref)</div><div class="ttdoc">从到活跃链表删除kchannel_ref_t实例，并放入关闭链表 </div><div class="ttdef"><b>Definition:</b> loop.c:352</div></div>
<div class="ttc" id="a00053_aa131da8fb72468b39b6ee0e2d46b17b2_html_aa131da8fb72468b39b6ee0e2d46b17b2"><div class="ttname"><a href="a00053_aa131da8fb72468b39b6ee0e2d46b17b2.html#aa131da8fb72468b39b6ee0e2d46b17b2">knet_loop_balance_option_e</a></div><div class="ttdeci">enum _loop_balance_option_e knet_loop_balance_option_e</div></div>
<div class="ttc" id="a00072_a3a3bef6d2959520812d726dc86eb3ab0_html_a3a3bef6d2959520812d726dc86eb3ab0"><div class="ttname"><a href="a00072_a3a3bef6d2959520812d726dc86eb3ab0.html#a3a3bef6d2959520812d726dc86eb3ab0">knet_impl_event_remove</a></div><div class="ttdeci">int knet_impl_event_remove(kchannel_ref_t *channel_ref, knet_channel_event_e e)</div></div>
<div class="ttc" id="a00072_ac0b0974feef9ded8f9d90d3a272e2a0e_html_ac0b0974feef9ded8f9d90d3a272e2a0e"><div class="ttname"><a href="a00072_ac0b0974feef9ded8f9d90d3a272e2a0e.html#ac0b0974feef9ded8f9d90d3a272e2a0e">knet_impl_event_add</a></div><div class="ttdeci">int knet_impl_event_add(kchannel_ref_t *channel_ref, knet_channel_event_e e)</div></div>
<div class="ttc" id="a00072_a58a5c12ddf68c8cc9f21c373bc0bcc6f_html_a58a5c12ddf68c8cc9f21c373bc0bcc6f"><div class="ttname"><a href="a00072_a58a5c12ddf68c8cc9f21c373bc0bcc6f.html#a58a5c12ddf68c8cc9f21c373bc0bcc6f">knet_loop_check_close</a></div><div class="ttdeci">void knet_loop_check_close(kloop_t *loop)</div><div class="ttdoc">检查关闭管道是否可以销毁 </div><div class="ttdef"><b>Definition:</b> loop.c:404</div></div>
<div class="ttc" id="a00033_a373dc3dca662cc251af21736cdcbf8b8_html_a373dc3dca662cc251af21736cdcbf8b8"><div class="ttname"><a href="a00033_a373dc3dca662cc251af21736cdcbf8b8.html#a373dc3dca662cc251af21736cdcbf8b8">_loop_profile_t::loop</a></div><div class="ttdeci">kloop_t * loop</div><div class="ttdef"><b>Definition:</b> loop_profile.c:31</div></div>
<div class="ttc" id="a00034_html"><div class="ttname"><a href="a00034.html">_loop_t</a></div><div class="ttdef"><b>Definition:</b> loop.c:36</div></div>
<div class="ttc" id="a00005_html"><div class="ttname"><a href="a00005.html">_buffer_t</a></div><div class="ttdef"><b>Definition:</b> buffer.c:28</div></div>
<div class="ttc" id="a00072_a59174eaaecf0028aeac92d919acb6cd7_html_a59174eaaecf0028aeac92d919acb6cd7"><div class="ttname"><a href="a00072_a59174eaaecf0028aeac92d919acb6cd7.html#a59174eaaecf0028aeac92d919acb6cd7">knet_loop_add_channel_ref</a></div><div class="ttdeci">void knet_loop_add_channel_ref(kloop_t *loop, kchannel_ref_t *channel_ref)</div><div class="ttdoc">添加kchannel_ref_t实例到活跃链表 </div><div class="ttdef"><b>Definition:</b> loop.c:312</div></div>
<div class="ttc" id="a00072_a203d49b05fbe8d0fed73099d7a48e2d8_html_a203d49b05fbe8d0fed73099d7a48e2d8"><div class="ttname"><a href="a00072_a203d49b05fbe8d0fed73099d7a48e2d8.html#a203d49b05fbe8d0fed73099d7a48e2d8">knet_loop_queue_cb</a></div><div class="ttdeci">void knet_loop_queue_cb(kchannel_ref_t *channel, knet_channel_cb_event_e e)</div><div class="ttdoc">通知管道回调函数 </div><div class="ttdef"><b>Definition:</b> loop.c:208</div></div>
<div class="ttc" id="a00072_afaf33dbbff8e1503b567163626adaca0_html_afaf33dbbff8e1503b567163626adaca0"><div class="ttname"><a href="a00072_afaf33dbbff8e1503b567163626adaca0.html#afaf33dbbff8e1503b567163626adaca0">knet_impl_destroy</a></div><div class="ttdeci">void knet_impl_destroy(kloop_t *loop)</div></div>
<div class="ttc" id="a00053_a0d9e0afbf02fb6ed6c5b1415dce51b05_html_a0d9e0afbf02fb6ed6c5b1415dce51b05"><div class="ttname"><a href="a00053_a0d9e0afbf02fb6ed6c5b1415dce51b05.html#a0d9e0afbf02fb6ed6c5b1415dce51b05">socket_t</a></div><div class="ttdeci">#define socket_t</div><div class="ttdef"><b>Definition:</b> config.h:88</div></div>
<div class="ttc" id="a00053_a2fd2faf971268f5b682ab375c455f7c9_html_a2fd2faf971268f5b682ab375c455f7c9"><div class="ttname"><a href="a00053_a2fd2faf971268f5b682ab375c455f7c9.html#a2fd2faf971268f5b682ab375c455f7c9">knet_channel_cb_event_e</a></div><div class="ttdeci">enum _channel_cb_event_e knet_channel_cb_event_e</div></div>
<div class="ttc" id="a00072_a768e24c6dbc4a4694397903a0c886d49_html_a768e24c6dbc4a4694397903a0c886d49"><div class="ttname"><a href="a00072_a768e24c6dbc4a4694397903a0c886d49.html#a768e24c6dbc4a4694397903a0c886d49">knet_loop_get_close_list</a></div><div class="ttdeci">kdlist_t * knet_loop_get_close_list(kloop_t *loop)</div><div class="ttdoc">取得关闭链表 </div><div class="ttdef"><b>Definition:</b> loop.c:307</div></div>
<div class="ttc" id="a00072_a5de04251528407b1077e26b8a619936a_html_a5de04251528407b1077e26b8a619936a"><div class="ttname"><a href="a00072_a5de04251528407b1077e26b8a619936a.html#a5de04251528407b1077e26b8a619936a">knet_loop_get_active_list</a></div><div class="ttdeci">kdlist_t * knet_loop_get_active_list(kloop_t *loop)</div><div class="ttdoc">取得活跃链表 </div><div class="ttdef"><b>Definition:</b> loop.c:302</div></div>
<div class="ttc" id="a00072_a1f1c1aa48792e069f46d4586da064e30_html_a1f1c1aa48792e069f46d4586da064e30"><div class="ttname"><a href="a00072_a1f1c1aa48792e069f46d4586da064e30.html#a1f1c1aa48792e069f46d4586da064e30">knet_loop_set_balance_options</a></div><div class="ttdeci">void knet_loop_set_balance_options(kloop_t *loop, knet_loop_balance_option_e options)</div><div class="ttdoc">设置负载均衡配置 </div><div class="ttdef"><b>Definition:</b> loop.c:433</div></div>
<div class="ttc" id="a00072_ac56384b1f4ca12d24768f4b3434994ad_html_ac56384b1f4ca12d24768f4b3434994ad"><div class="ttname"><a href="a00072_ac56384b1f4ca12d24768f4b3434994ad.html#ac56384b1f4ca12d24768f4b3434994ad">knet_impl_channel_accept</a></div><div class="ttdeci">socket_t knet_impl_channel_accept(kchannel_ref_t *channel_ref)</div></div>
<div class="ttc" id="a00072_a408e38fd57e572c9f9fd70d729663495_html_a408e38fd57e572c9f9fd70d729663495"><div class="ttname"><a href="a00072_a408e38fd57e572c9f9fd70d729663495.html#a408e38fd57e572c9f9fd70d729663495">knet_loop_get_data</a></div><div class="ttdeci">void * knet_loop_get_data(kloop_t *loop)</div><div class="ttdoc">取得用户数据指针 </div><div class="ttdef"><b>Definition:</b> loop.c:453</div></div>
<div class="ttc" id="a00053_accd62b4c787cfb91e81aa14210302863_html_accd62b4c787cfb91e81aa14210302863"><div class="ttname"><a href="a00053_accd62b4c787cfb91e81aa14210302863.html#accd62b4c787cfb91e81aa14210302863">knet_channel_event_e</a></div><div class="ttdeci">enum _channel_event_e knet_channel_event_e</div></div>
<div class="ttc" id="a00072_a127c7897dd1ea9db069c7855bbebb557_html_a127c7897dd1ea9db069c7855bbebb557"><div class="ttname"><a href="a00072_a127c7897dd1ea9db069c7855bbebb557.html#a127c7897dd1ea9db069c7855bbebb557">knet_loop_get_balance_options</a></div><div class="ttdeci">knet_loop_balance_option_e knet_loop_get_balance_options(kloop_t *loop)</div><div class="ttdoc">取得负载均衡配置 </div><div class="ttdef"><b>Definition:</b> loop.c:438</div></div>
<div class="ttc" id="a00053_html"><div class="ttname"><a href="a00053.html">config.h</a></div></div>
<div class="ttc" id="a00072_a24e13537994fbbf0920a20064f4d0d63_html_a24e13537994fbbf0920a20064f4d0d63"><div class="ttname"><a href="a00072_a24e13537994fbbf0920a20064f4d0d63.html#a24e13537994fbbf0920a20064f4d0d63">knet_loop_set_impl</a></div><div class="ttdeci">void knet_loop_set_impl(kloop_t *loop, void *impl)</div><div class="ttdoc">设置选取器实现 </div><div class="ttdef"><b>Definition:</b> loop.c:341</div></div>
<div class="ttc" id="a00072_a8689d188eed30a72dc802eb008eef89a_html_a8689d188eed30a72dc802eb008eef89a"><div class="ttname"><a href="a00072_a8689d188eed30a72dc802eb008eef89a.html#a8689d188eed30a72dc802eb008eef89a">knet_loop_notify_close</a></div><div class="ttdeci">void knet_loop_notify_close(kloop_t *loop, kchannel_ref_t *channel_ref)</div><div class="ttdoc">发送事件通知 - 关闭管道 </div><div class="ttdef"><b>Definition:</b> loop.c:202</div></div>
<div class="ttc" id="a00072_a6bb7816f43410b76b5b0c6d0f6edfbd8_html_a6bb7816f43410b76b5b0c6d0f6edfbd8"><div class="ttname"><a href="a00072_a6bb7816f43410b76b5b0c6d0f6edfbd8.html#a6bb7816f43410b76b5b0c6d0f6edfbd8">knet_loop_check_balance_options</a></div><div class="ttdeci">int knet_loop_check_balance_options(kloop_t *loop, knet_loop_balance_option_e options)</div><div class="ttdoc">检查负载均衡配置是否开启 </div><div class="ttdef"><b>Definition:</b> loop.c:443</div></div>
<div class="ttc" id="a00072_abc481758c524a7dd779ac7c4dad144f9_html_abc481758c524a7dd779ac7c4dad144f9"><div class="ttname"><a href="a00072_abc481758c524a7dd779ac7c4dad144f9.html#abc481758c524a7dd779ac7c4dad144f9">knet_impl_remove_channel_ref</a></div><div class="ttdeci">int knet_impl_remove_channel_ref(kloop_t *loop, kchannel_ref_t *channel_ref)</div></div>
<div class="ttc" id="a00072_a352ae2febcbb9264ef1d5043618bcb80_html_a352ae2febcbb9264ef1d5043618bcb80"><div class="ttname"><a href="a00072_a352ae2febcbb9264ef1d5043618bcb80.html#a352ae2febcbb9264ef1d5043618bcb80">knet_loop_get_thread_id</a></div><div class="ttdeci">thread_id_t knet_loop_get_thread_id(kloop_t *loop)</div><div class="ttdoc">取得选取器当前线程ID </div><div class="ttdef"><b>Definition:</b> loop.c:273</div></div>
<div class="ttc" id="a00073_html"><div class="ttname"><a href="a00073.html">loop_api.h</a></div></div>
<div class="ttc" id="a00007_html"><div class="ttname"><a href="a00007.html">_channel_ref_t</a></div><div class="ttdef"><b>Definition:</b> channel_ref.c:61</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2015年 七月 22日 星期三 10:41:03 , 为 knet使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
